import { baseUrl } from "amtf/utils/request"

export const 上传路径 = `${baseUrl === "/" ? "" : baseUrl}/fileUploadAndDownload/upload`

export const 上传文件 = async (filePath, name, fileType = 'image') => {
	let res = await uni.uploadFile({
		url: 上传路径 + '?文件名=' + name,
		filePath,
	});
	console.log('上传完成 res.data ', res.data);
	let data = JSON.parse(res.data)
	console.log('data: ', data);
	return data
}